\hypertarget{class_alfar_engine_1_1_components_1_1_collider}{
\section{\-Alfar\-Engine.\-Components.\-Collider \-Class \-Reference}
\label{class_alfar_engine_1_1_components_1_1_collider}\index{\-Alfar\-Engine.\-Components.\-Collider@{\-Alfar\-Engine.\-Components.\-Collider}}
}


\-Add a \hyperlink{class_alfar_engine_1_1_components_1_1_collider}{\-Collider} to this \hyperlink{class_alfar_engine_1_1_game_object}{\-Game\-Object}. \-A \hyperlink{class_alfar_engine_1_1_components_1_1_collider}{\-Collider} will detect collision with other collider in the scene.\par
 \-If the \-Game \-Object derivate that have this collider implement the \hyperlink{interface_alfar_engine_1_1_components_1_1_i_collidable}{\-I\-Collidable} interface, it will receive three message \-:  


\-Inheritance diagram for \-Alfar\-Engine.\-Components.\-Collider\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{class_alfar_engine_1_1_components_1_1_collider}
\end{center}
\end{figure}
\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_alfar_engine_1_1_components_1_1_collider_a28ff6e2694061279c25146e7b8a94231}{
{\bfseries \-Collider} (\hyperlink{class_alfar_engine_1_1_game_object}{\-Game\-Object} p\-Owner)}
\label{class_alfar_engine_1_1_components_1_1_collider_a28ff6e2694061279c25146e7b8a94231}

\item 
override void \hyperlink{class_alfar_engine_1_1_components_1_1_collider_a18e0064b100dbf5a29ec675de408af26}{\-Update} (\-Game\-Time p\-Time)
\begin{DoxyCompactList}\small\item\em \-Update this components (override to add specific behaviour) \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{\-Protected \-Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_alfar_engine_1_1_components_1_1_collider_adfc108b5a5715dd3434cc0ab96e6c5b8}{
\-Rectangle {\bfseries m\-Rect}}
\label{class_alfar_engine_1_1_components_1_1_collider_adfc108b5a5715dd3434cc0ab96e6c5b8}

\item 
\hypertarget{class_alfar_engine_1_1_components_1_1_collider_abb6e7e386b4dfe7ab88739d8aaf6e2dc}{
\hyperlink{class_alfar_engine_1_1_components_1_1_collider}{\-Collider} {\bfseries m\-Parent}}
\label{class_alfar_engine_1_1_components_1_1_collider_abb6e7e386b4dfe7ab88739d8aaf6e2dc}

\item 
\hypertarget{class_alfar_engine_1_1_components_1_1_collider_a7f50958459ed76e3f7e9b01356e0d31e}{
\-List$<$ \hyperlink{class_alfar_engine_1_1_components_1_1_collider}{\-Collider} $>$ {\bfseries m\-Children}}
\label{class_alfar_engine_1_1_components_1_1_collider_a7f50958459ed76e3f7e9b01356e0d31e}

\end{DoxyCompactItemize}
\subsection*{\-Static \-Protected \-Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_alfar_engine_1_1_components_1_1_collider_abc798bc42559fba6aecb4e309e587f28}{
static \hyperlink{class_alfar_engine_1_1_components_1_1_collider}{\-Collider} {\bfseries s\-Root} = null}
\label{class_alfar_engine_1_1_components_1_1_collider_abc798bc42559fba6aecb4e309e587f28}

\end{DoxyCompactItemize}
\subsection*{\-Properties}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_alfar_engine_1_1_components_1_1_collider_a198892f2b81409913a0621976ff503a1}{
\-Rectangle {\bfseries bounds}\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}}
\label{class_alfar_engine_1_1_components_1_1_collider_a198892f2b81409913a0621976ff503a1}

\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}
\-Add a \hyperlink{class_alfar_engine_1_1_components_1_1_collider}{\-Collider} to this \hyperlink{class_alfar_engine_1_1_game_object}{\-Game\-Object}. \-A \hyperlink{class_alfar_engine_1_1_components_1_1_collider}{\-Collider} will detect collision with other collider in the scene.\par
 \-If the \-Game \-Object derivate that have this collider implement the \hyperlink{interface_alfar_engine_1_1_components_1_1_i_collidable}{\-I\-Collidable} interface, it will receive three message \-: 

\-On\-Collision\-Enter on the first contact \par
 \-On\-Collision\-Stay on the following frame if still in contact \par
 \-On\-Collision\-Exit when it leave the contact \par


\-If you wanna move the \hyperlink{class_alfar_engine_1_1_game_object}{\-Game\-Object} during one of this callback, use \-Move\-To of the collider, this will cause the engine to reset the flag of contact.\par
 \-It will allow to receive once ahain a $\ast$\-Enter callback if still in contact. \-Usefull when you use the callback to \-P\-R\-E\-V\-E\-N\-T to enter in the collider.\par
 \-It will generate a $\ast$\-Enter message each time you still enter the collider, allowing to \char`\"{}get out\char`\"{} each time without having to make a $\ast$\-Stay.\par
 

\subsection{\-Member \-Function \-Documentation}
\hypertarget{class_alfar_engine_1_1_components_1_1_collider_a18e0064b100dbf5a29ec675de408af26}{
\index{\-Alfar\-Engine\-::\-Components\-::\-Collider@{\-Alfar\-Engine\-::\-Components\-::\-Collider}!\-Update@{\-Update}}
\index{\-Update@{\-Update}!AlfarEngine::Components::Collider@{\-Alfar\-Engine\-::\-Components\-::\-Collider}}
\subsubsection[{\-Update}]{\setlength{\rightskip}{0pt plus 5cm}override void \-Alfar\-Engine.\-Components.\-Collider.\-Update (
\begin{DoxyParamCaption}
\item[{\-Game\-Time}]{p\-Time}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{class_alfar_engine_1_1_components_1_1_collider_a18e0064b100dbf5a29ec675de408af26}


\-Update this components (override to add specific behaviour) 


\begin{DoxyParams}{\-Parameters}
{\em p\-Time} & \\
\hline
\end{DoxyParams}


\-Reimplemented from \hyperlink{class_alfar_engine_1_1_components_1_1_a_component_ad600a3290e0db6305428786f5e3e2015}{\-Alfar\-Engine.\-Components.\-A\-Component}.



\-The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
\-E\-:/\-X\-N\-A/alfar\-Engine/\-Alfar\-Engine/\-Components/\-Collider.\-cs\end{DoxyCompactItemize}
